<!DOCTYPE html>
<?php require dirname(dirname(__FILE__)) . '/view/checkuser.php';?>
<html>
<head>
<meta charset="UTF-8">
<title>提醒</title>
<link rel="stylesheet" type="text/css" href="../include/css/base.css" />
</head>
<body>

<div>
	<!--div style="border: 1px solid #CCC; border-bottom: 2px solid #000000; padding: 10px; padding-bottom: 20px;" >
		<div style="background-color: #f3f3f3;">title</div>
		<div>content</div>
	</div-->


<?php
require dirname(dirname(__FILE__)) . '/include/conf.php';
require dirname(dirname(__FILE__)) . '/include/basefunc.php';
require dirname(dirname(__FILE__)) . '/include/database.php';

$db = db_touzhu();

$sql = "select id, type, content, add_time, status from bet_remind order by id desc limit 20";
$re = $db->query($sql);

if (!empty($re)){
	$unread_ids = array();
	foreach ($re as $val){
		if ($val['status'] == 0){
			$unread_ids[] = $val['id'];
		}
		echo '<div style="border: 1px solid #CCC; border-bottom: 2px solid #000000; padding: 10px; padding-bottom: 20px;" >',
			'<div style="background-color: #f3f3f3;"><span style="color:red;">NEW</span></div>',
			'<div>', $val['content'], '</div>',
			'</div>';
	}
	if (!empty($unread_ids)){
		// 设置为已读
	}
}
?>
</div>

</body>
</html>